package com.mybatisflex.demo.audit;

import com.mybatisflex.core.audit.AuditMessage;
import com.mybatisflex.core.audit.MessageFactory;
import com.mybatisflex.demo.manager.LoginManager;

/**
 * @author 王帅
 * @since 2023-08-23
 */
public class AuditMessageFactory implements MessageFactory {

    @Override
    public AuditMessage create() {
        AuditMessage auditMessage = new AuditMessage();
        auditMessage.setUser(LoginManager.getLoginUser().getUserName());
        auditMessage.setPlatform("mybatis flex demo");
        return auditMessage;
    }

}